import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
    {
        path: '/',
        name: 'Main',
        redirect: 'login',
        component: () => import('../views/Main.vue'),
        children: [
            {
                path: '/plan',
                name: 'plan',
                component: () => import('../views/Plan.vue')
            },
            {
                path: '/revexp',
                name: 'revexp',
                component: () => import('../views/RevExp.vue')
            },
            {
                path: '/date',
                name: 'date',
                component: () => import('../views/RevExpDate.vue')
            },
            {
                path: '/category',
                name: 'category',
                component: () => import('../views/RevExpCategory.vue')
            },
            {
                path: '/categoryManage',
                name: 'categoryManage',
                component: () => import('../views/CategoryManage.vue')
            },
            {
                path: '/statement',
                name: 'statement',
                component: () => import('../views/Statement.vue')
            },
            {
                path: '/manage',
                name: 'manage',
                component: () => import('../views/Manage.vue')
            },
            {
                path: '/homePage',
                name: 'homePage',
                component: () => import('../views/HomePage.vue')
            },
        ]
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../views/Login.vue'),
    }
]
const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router